﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DSheet.Core.Data
{
    public class DRow
    {
        private string _dPath;

        public int RowIndex { get; set; }
        public string DPath
        {
            get
            {
                if (string.IsNullOrEmpty(_dPath))
                {
                    for (int index = 0; index < Items.Length; index++)
                    {
                        _dPath += string.Format("/{0}", Items[index].Code);
                    }
                }
                return _dPath;
            }
        }

        public DItem[] Items { get; set; }
    }

    public class DItem
    {
        public string Code { get; set; }
        public string Name { get; set; }
        public int Level { get; set; }
        public string Formula { get; set; }
    }
}
